﻿using Nimbus1._0Platform;
using Nimbus2._0Platform;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WeatherMonitoringSystem;
using WeatherStationSys.Common;
using WeatherStationSys.Interface;
using WeatherStationSys.Interface.Scheduler;
using WeatherStationSys.UI;
using Nimbus1_0BarometricPressureSensor = Nimbus1._0Platform.Nimbus1_0BarometricPressureSensor;
using Nimbus1_0TemperatureSensor = Nimbus1._0Platform.Nimbus1_0TemperatureSensor;

namespace WeatherStationSys
{
    class Program
    {
        static void Main(string[] args)
        {
            #region Version4.上端调用的时候，只指定了1次1.0硬件平台就行了(注-抽象工厂模式：1次性把具体平台的对象都创建出来)
            //{
            //    StationTookit factory = new Nimbus1_0StationTookit();
            //    //被观察者(这里是特指Nimbus1.0硬件平台的气压传感器)
            //    ISubject iTemperatureSensor = factory.MakeTemperature();
            //    //被观察者(这里特指Nimbus1.0硬件平台的温度传感器)
            //    ISubject iBarometricPressureSensor = factory.MakeBarometricPressure();
            //    //调度器(这里特指Nimbus1.0硬件平台的调度器)
            //    IAlarmClock alarmClock = factory.GetAlarmClock();

            //    //观察者(这里特指电视机显示器和电脑显示器，用户界面)
            //    IObserver tv = new TVMonitoringScreen();
            //    IObserver computer = new ComputerMonitoringScreen();

            //    //给温度传感器观察者列表里注册观察者(TV,Computer)
            //    iTemperatureSensor.AddObserver(tv);
            //    iTemperatureSensor.AddObserver(computer);

            //    //给气压传感器的观察者列表里注册观察者(TV,Computer)
            //    iBarometricPressureSensor.AddObserver(tv);
            //    iBarometricPressureSensor.AddObserver(computer);

            //    alarmClock.Start();
            //}
            #endregion

            #region 5.让StationTookit创建AlarmClock
            {
                WeatherStation weatherStation = new WeatherStation();
            }
            #endregion

            Console.Read();
        }
    }
}
